package comchar;

public class Complexchar {
    public static void main(String[] args){
    	char[] a= new char[]{'a','c','u','b','e','p','f','z',' '};
    	int i,j;
    	for(i=0;i<=7;i++){
    		System.out.print(a[i]+" ");
    	}
    	System.out.println();
    	for(char element: a){
    		System.out.print(element+" ");
    	}
    	System.out.println();
    	for(i=7;i>=0;i--){
    		for(j=0;j<=(i-1);j++){
    			if(a[j]>a[j+1]){
    				a[8]=a[j];
    				a[j]=a[j+1];
    				a[j+1]=a[8];
    			}
    		}
    	}
    	a[8]=' ';
    	for(i=0;i<=7;i++){
    		System.out.print(a[i]+" ");
    	}
    	System.out.println();
    	for(char element: a){
    		System.out.print(element+" ");
    	}
    }
}
